// 请求接口
import request from "@/utils/request.js";

// 登录接口
export function login(data) {
  return request({
    url: "/user",
    method: "POST",
    data: data,
  });
}

// 注册接口
export function signup(data) {
  return request({
    url: "/user/add",
    method: "POST",
    data: data,
  });
}

export function changeInfo(data) {
  return request({
    url: "/user",
    method: "put",
    data: data,
  });
}

export function deleteUser(id) {
  return request({
    url: "/user/" + id,
    method: "delete",
  });
}
